package com.jnu.myAccount.record;

import java.io.Serializable;

public class Record implements Serializable {

    //账户、收入支出、日期、消费类型索引、金额
    private String account;
    private boolean inOrOutValue = true;
    private String dateValue ="2000-01-01";
    private int indexOfType = 0;
    private float fundValue = 0;

    public Record(String account, Boolean inOrOutValue, String dateValue, int indexOfType, float fundValue) {

        this.account = account;
        this.inOrOutValue = inOrOutValue;
        this.dateValue = dateValue;
        this.indexOfType = indexOfType;
        this.fundValue = fundValue;
    }

    public boolean isInOrOutValue() {
        return inOrOutValue;
    }

    public void setInOrOutValue(boolean inOrOutValue) {
        this.inOrOutValue = inOrOutValue;
    }

    public String getTypeString() {
        return DataPackage.getKindHeadsInstance().get(indexOfType);
    }

    public int getIndexOfType() {
        return indexOfType;
    }

    public void setIndexOfType(int indexOfType) {
        this.indexOfType = indexOfType;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public float getFundValue() {
        return fundValue;
    }

    public void setFundValue(float fundValue) {
        this.fundValue = fundValue;
    }

    public String getDateValue() {
        return dateValue;
    }

    public void setDateValue(String dateValue) {
        this.dateValue = dateValue;
    }

    public int getIconResource() {
        return DataPackage.getKindIconsInstance().get(indexOfType);
    }


}
